<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html ng-app="AlarmApp">
<head>
<base href="<%=basePath%>">

<title>My JSP 'alarmList.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<style type="text/css">
.controls.inline>* {
	display: inline-block;
}

.controls.inline>input {
	width: 100px;
}
</style>
</head>

<body>
	<div class="row-fluid" ng-controller="alarmAddCtrl">
		<!-- block -->
		<div class="block">
			<div class="navbar navbar-inner block-header">
				<div class="muted pull-left">添加巡检</div>
			</div>
			<div class="block-content collapse in">
				<form class="form-horizontal" id='addAlarmForm' action="addPolling.do">
					<div class="span6">
						<fieldset>
							<legend>添加巡检</legend>
							<div class="control-group">
								<label class="control-label datetimepicker" for="focusedInput">时间:</label>
								<div class="controls">
									<input type="hidden" name="id" value="${polling.id}"/>
									<input class="input-xlarge focused"
										type="datetime" name="date" value="${polling.date}">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">巡检任务:</label>
								<div class="controls">
									<input class="input-xlarge disabled datetimepicker" id="disabledInput"
										type="text" placeholder="" name="address" value="${polling.address}">
								</div>
							</div>
							<%--  <div class="control-group" ng-controller="gridInfoCtrl">
								<label class="control-label" for="disabledInput">:</label>
								<div class="controls">
									<select name="grid_id" value="${grid_id}" value="${alarm.grid_id }">
										<option ng-repeat="data in allGrids" value="{{data.id}}">{{data.name}}</option>
									</select>
								</div>
							</div> --%>
							<div class="control-group">
								<label class="control-label">任务概述:</label>
								<div class="controls">
									<input id="selectError" name="polling.p_desc" value="${polling.p_desc}"/>
								</div>
							</div>
							<div class="form-actions">
								<button type="button" class="btn btn-primary"
									ng-click="addAlarm()">保存</button>
								<button type="reset" class="btn">重置</button>
							</div>
						</fieldset>
					</div>
				</form>
			</div>
		</div>
		<!-- /block -->
	</div>
	<script>
		/* var app = angular.module('alarmApp', []);
		app.controller('alarmCtrl', function($scope, $http) {
			$http.post("addAlarm.json").success(function(response) {
				$scope.alarmList = response;
			});
		}); */
	</script>
</body>
</html>
